package com.ksd.result;

import lombok.Data;

import java.io.Serializable;


/**
 * 统一返回对象
 * @param <T>
 */
@Data
public class Result<T> implements Serializable {


    /**
     * 返回状态码
     */
    private Integer code;

    /**
     * 描述信息
     */
    private String desc;

    /**
     * 返回数据
     */
    private T data;


    private Result(){}
    public Result(Integer code) {
        this.code = code;
    }
    public Result(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public Result(Integer code, String desc, T data) {
        this.code = code;
        this.desc = desc;
        this.data = data;
    }





}
